<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理员界面</title>
<script src="https://code.jquery.com/jquery.js"></script><!-- 导入JQuery方便使用ajax插件 -->
<link href="/ProfessionalDesign/css/bootstrap.min.css" rel="stylesheet"><!-- 导入bootstrap -->

<script src="/ProfessionalDesign/lib/bootstrap.min.js"></script><!-- 导入bootstrap核心js文件 -->
<script src="/ProfessionalDesign/js/carts.js"></script>
<body>
	<nav class="navbar navbar-default navbar-static-top">
	<div class="container-fluid">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse"
				data-target="#myNavbar">
				<span class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<a class="navbar-brand" id="top"
				style='padding-left: 300px; color: red'
				href="/ProfessionalDesign/login">亲，请登录</a>

		</div>
		<div class="collapse navbar-collapse" id="myNavbar">
			<ul class="nav navbar-nav" style="padding-left: 100px">
				<li><a href="/ProfessionalDesign/sign">免费注册</a></li>
				<li><a href="javascript:subToHX()">购物主页</a></li>
				<li class="dropdown"><a href="#" class="dropdown-toggle"
					data-toggle="dropdown" role="button" aria-haspopup="true"
					aria-expanded="false">我的<span class="caret"></span></a>
					<ul class="dropdown-menu">
						<li><a href="#">我的信息</a></li>
						<li><a href="#">订单信息</a></li>
					</ul></li>
				<li class="dropdown"><a href="#" class="dropdown-toggle"
					data-toggle="dropdown" role="button" aria-haspopup="true"
					aria-expanded="false">购物车 <span class="caret"></span></a>
					<ul class="dropdown-menu">
						<li><a href="#">Action</a></li>
						<li><a href="#">Another action</a></li>
						<li><a href="#">Something else here</a></li>
						<li role="separator" class="divider"></li>
						<li class="dropdown-header">Nav header</li>
						<li><a href="#">Separated link</a></li>
						<li><a href="#">One more separated link</a></li>
					</ul></li>
				<li class="dropdown"><a href="#" class="dropdown-toggle"
					data-toggle="dropdown" role="button" aria-haspopup="true"
					aria-expanded="false">收藏夹 <span class="caret"></span></a>
					<ul class="dropdown-menu">
						<li><a href="#">收藏的店铺</a></li>
						<li><a href="#">收藏的商品</a></li>
					</ul></li>
			</ul>
			<ul class="nav navbar-nav navbar-right" style="padding-right: 300px">
				<li class="active"><a href="../navbar/">商品分类</a></li>
				<li class="dropdown"><a href="#" class="dropdown-toggle"
					data-toggle="dropdown" role="button" aria-haspopup="true"
					aria-expanded="false">商家中心<span class="caret"></span></a>
					<ul class="dropdown-menu">
						<li><a href="#">已卖出的宝贝</a></li>
						<li><a href="#">免费开店</a></li>
					</ul></li>
			</ul>
		</div>
	</div>
	</nav>

	<div class="container">
		<div class="row">
			<div class="col-sm-2">
				<ul class="nav nav-sidebar">
					<li class="active"><h3>
							全部功能 <span class="sr-only">(current)</span>
						</h3></li>
					<li><a href="/ProfessionalDesign/cart/all?userid=${userinf.userid}" class="a">购物车</a></li>
					<li><a href="/ProfessionalDesign/favorite/all?userid=${userinf.userid}" class="a">收藏夹</a></li>
					<li><a href="/ProfessionalDesign/orderuser?user_id=${userinf.userid}" class="a">历史订单</a></li>
					<li><a href="/ProfessionalDesign/toUserMsg?userid=${userinf.userid}" class="a">我的信息</a></li>
					<li><a href="/ProfessionalDesign/toAddress?userid=${userinf.userid}" class="a">电话地址</a></li>
				</ul>
			</div>
			<div id="main" class="col-sm-10"></div>
		</div>
	</div>

	<div class="jumbotron text-center"
		style="margin-top: 100px; margin-bottom: 0">
		<br>
		<p>© 2022 ProfessionalDesign.com 版权所有</p>
		<a>关于我们</a>| <a>合作伙伴</a>| <a>营销中心</a>| <a>联系客服</a>| <a>开放平台</a>| <a>诚征英才</a>|
		<a>联系我们</a>| <a>网站地图</a>| <a>法律声明及隐私权政策</a>
	</div>
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">售后填写</h4>
            </div>
            <div class="modal-body">
                <form action="">
                    <div class="form-group">
                    <label for="userid">Userid</label>
                    <input type="email" class="form-control" id="userid" placeholder="Userid">
                    </div>
                    <div class="form-group">
                        <label for="goodid">Goodid</label>
                        <input type="email" class="form-control" id="goodid" placeholder="Goodid">
                    </div>
                    <div class="form-group">
                        <label for="shopid">Shopid</label>
                        <input type="email" class="form-control" id="shopid" placeholder="Shopid">
                    </div>
                    <div class="form-group">
                        <label for="cont">content</label>
                        <textarea class="form-control" id="cont" name="content"></textarea>
                    </div>
                    <button type="submit" class="btn btn-default">Submit</button>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Reset</button>
            </div>
        </div>
    </div>
</div>
</body>
<style>
.navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus
	{
	color: red;
}

.navbar-default .navbar-nav>li>a:hover, .navbar-default .navbar-nav>li>a:focus
	{
	color: red;
}
.a:hover{
	    color: #ff873e;
    text-decoration: underline;
}
</style>

<script>
$(function(){
if(${userinf!=null}){
	$("#top").html('尊贵的用户'+'"'+'${userinf.username}'+'"'+'欢迎您');
}
})
</script>
<script>
$(document).ready(function () {
	if(${href==1}){
 		$("#main").load('toAddress?userid=${userinf.userid}');
		$(".a").click(function (e) {
	        e.preventDefault();
	        $("#main").load($(this).attr("href"));
	    })
	}else if(${href==2}){
		$("#main").load('toAddress?userid=${userinf.userid}');
		$(".a").click(function (e) {
	        e.preventDefault();
	        $("#main").load($(this).attr("href"));
	    })
	}else if(${href==3}){
		$("#main").load('toAddress?userid=${userinf.userid}');
		$(".a").click(function (e) {
	        e.preventDefault();
	        $("#main").load($(this).attr("href"));
	    })
	}
	else if(${href==4}){
		$("#main").load('/ProfessionalDesign/cart/all?userid=${userinf.userid}');
		$(".a").click(function (e) {
	        e.preventDefault();
	        $("#main").load($(this).attr("href"));
	    })
	}
	else if(${href==5}){
		$("#main").load('/ProfessionalDesign/favorite/all?userid=${userinf.userid}');
		$(".a").click(function (e) {
	        e.preventDefault();
	        $("#main").load($(this).attr("href"));
	    })
	}
	else{
		$("#main").load('toUserMsg?userid=${userinf.userid}');
    	$(".a").click(function (e) {
        e.preventDefault();
        $("#main").load($(this).attr("href"));
    })}
   
})
function subToHX(){
	if(${userinf.userid!=null}){
		var form = $("<form>"); //定义一个form表单  
		form.attr('style', 'display:none'); //在form表单中添加查询参数  
		form.attr('method', 'post');
		form.attr('action', "/ProfessionalDesign/tohome");
		form.append('<input type="text" name="userid" value="${userinf.userid}">');
		form.append('<input type="text" name="pwd" value="${userinf.pwd}">');
		$('body').append(form); //将表单放置在web中  
		form.submit(); //表单提交
	}else{
		window.location.href="/ProfessionalDesign/tohome";
	}	
}

</script>
</html>